Skip to content

feat(cli): add onboarding with openai as option#11111

Open
uinstinct wants to merge 7 commits intocontinuedev:mainfrom
uinstinct:onboard-openai
Open

feat(cli): add onboarding with openai as option#11111
uinstinct wants to merge 7 commits intocontinuedev:mainfrom
uinstinct:onboard-openai

Conversation

@uinstinct
Copy link
Contributor

@uinstinct uinstinct commented Mar 6, 2026

Description

  • Add openai api key (with gpt 5.4) as onboarding provider and model.
  • Also remove login with continue from onboarding options
  • Use local model config instead of hub uses

AI Code Review

  • Team members only: AI review runs automatically when PR is opened or marked ready for review
  • Team members can also trigger a review by commenting @continue-review

Checklist

  • [] I've read the contributing guide
  • [] The relevant docs, if any, have been updated or created
  • [] The relevant tests, if any, have been updated or created

Screen recording or screenshot

[ When applicable, please include a short screen recording or screenshot - this makes it much easier for us as contributors to review and understand your changes. See this PR as a good example. ]

Tests

[ What tests were added or updated to ensure the changes work as expected? ]


Continue Tasks: 🔄 7 running — View all


Summary by cubic

Adds OpenAI (GPT 5.4) to CLI onboarding and removes “Log in with Continue”. The flow writes local model entries (name, provider, model, apiKey) to ~/.continue/config.yaml and validates Anthropic and OpenAI keys.

  • New Features

    • OpenAI option: prompt for an sk- key and write gpt-5.4 to config.
    • Anthropic option auto-detects ANTHROPIC_API_KEY or prompts and writes claude-sonnet-4-6.
  • Refactors

    • Replace hub uses with local fields across onboarding, YAML updater, and docs; add updateOpenAIModelInYaml and split config writers.
    • Provider-specific key validation (isValidOpenAIApiKey, improved errors); update e2e to expect local fields and remove checkHasAcceptableModel.

Written for commit 5ee2a4c. Summary will update on new commits.

@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Mar 6, 2026
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

3 issues found across 5 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="extensions/cli/src/onboarding.ts">

<violation number="1" location="extensions/cli/src/onboarding.ts:114">
P1: Custom agent: **Don't use console.log**

New console logging was added; replace these with the project logger to comply with the "Don't use console.log" rule.</violation>
</file>

<file name="extensions/cli/src/util/apiKeyValidation.ts">

<violation number="1" location="extensions/cli/src/util/apiKeyValidation.ts:22">
P2: OpenAI API key validation is overly permissive and can incorrectly accept Anthropic keys (sk-ant-...), leading to false-positive onboarding validation. The `startsWith("sk-")` check will match Anthropic keys since they also start with "sk-", causing provider-mismatch errors when the key is later used with OpenAI APIs.</violation>
</file>

<file name="extensions/cli/spec/onboarding.md">

<violation number="1" location="extensions/cli/spec/onboarding.md:34">
P2: Spec documents stale `uses:` schema that conflicts with actual onboarding implementation. The spec shows `uses: openai/gpt-5.4` with `with:` blocks, but the CLI onboarding writes local model configs. Users following this documentation will create invalid configs.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

@uinstinct uinstinct requested a review from a team as a code owner March 9, 2026 17:53
@uinstinct uinstinct requested review from Patrick-Erichsen and removed request for a team March 9, 2026 17:53
…d remove dead code

The headless-anthropic-api-key test expected the old hub `uses` format
but the config now writes local model fields. Also removes unused
checkHasAcceptableModel which only checked for claude.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L This PR changes 100-499 lines, ignoring generated files.

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

2 participants